<html><title>Profil Pemandu</title>
<body>
<?php
$id_group = $this->session->userdata('tipe_user');//ambil id usergroup
?>
<h1>Halo admin, jangan merusak data pemandu yow :)</h1>
<?php if($id_group > 0){
	echo "<h3>";
	echo anchor('cprofil/nambahorang','Tambah Data Pemandu');
	echo "</h3>";
	} ?>
<?php
if (empty ($hasil)) {
	echo "Kok sepi gak ada siapa-siapa sih? :'";
} else {
?>
<h3> Daftar Pemandu </h3>
<table border=1>
<tr><th> No </th>
	<th> Nama </th>
	<th> Fakultas </th>
	<th> Jurusan </th>
	<th> Status </th>
	<?php if ($id_group > 0){
		echo "<html>";
		echo "<th> Pilihan </th>";
		echo "</html>";
	}
	?>
</tr>
<?php
$no = 1;
foreach($hasil as $data):
?>
<tr><td><?php echo $no; ?></td>
	<td><?php echo $data->nama; ?></td>
	<td><?php echo $data->fakultas; ?></td>
	<td><?php echo $data->jurusan; ?></td>
	<td><?php if($data->status == 0){
		echo "Belum ada validasi";
	}else{
		echo "Sudah tervalidasi";
	}; ?></td>
	<?php $group = $data->id_pemandu;
		if ($id_group == 1){
		echo "<html><td>";
		echo anchor('cprofil/gantiorang/'.$group,'Detail |');
		echo anchor('cprofil/buangorang/'.$group,' Hapus |', array('onclick' => "return confirm('Apa Anda yakin ingin menghapus?')"));
		echo anchor('cprofil/setujuiorang/'.$group,' Validasi');
		echo "</td></html>";
	}?>
</tr>
<?php
$no++;
endforeach;
?>
</table>
<?php
echo anchor('homez','Rumah');
}
?>
</body>
</html>
